package com.selectest;

import com.tools.WaitUtil;
import com.tools.WebElementUtil;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.Test;

import javax.xml.ws.RequestWrapper;
import java.util.concurrent.TimeUnit;

public class FitstWebTest {


    //WebDriverWait wait = new WebDriverWait(driver,10);


    @Test
    public void test_01() {

    System.setProperty("webdriver.chrome.driver","D:\\web_chromedriver\\122.6\\chromedriver.exe");
        WebDriver driver = new ChromeDriver();
        driver.get("https://www.baidu.com/");

        //http://192.168.0.113:8080/

        //强制等待
        WaitUtil.forcedWaiting(3);
        System.out.println("强制等待3s");

        WaitUtil.forcedWaiting(2);
        System.out.println("隐试等待2s");

        driver.manage().timeouts().setScriptTimeout(10,TimeUnit.SECONDS);

        driver.quit();



    }

}
